home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Libraries
/
Std I⁄O for C
/
test sf_stdio.c
< prev
Wrap
C/C++ Source or Header
|
1988-03-02
|
498b
|
31 lines
/* test sf_stdio.c
*
* Chris Borton, 27 February 1988
* Prompt for text file with SFGetFile and use that as a stream of input
* like stdin.
*/
#include <stdio.h>
#include <proto.h>
#include "sf_stdio.h"
int main(void);
main()
{
char c;
printf("Starting up...\n");
if (sf_stdin()) {
while ((c = getc(stdin)) != EOF)
printf("%c",c);
}
printf("Now choose an output file and type until 'q':\n\n");
if (sf_stdout()) {
while ((c = getch()) != 'q')
fputc(c,stdout);
}
}